<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8;" />
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%request.setCharacterEncoding("utf-8"); %>
<%@ page import="com.exam.domain.*"%>
<%@ page import="javax.servlet.*"%>
<%Administrator admin= (Administrator)session.getAttribute("admininfo"); %>
<%String param=(String)request.getParameter("param"); %>
<script  type="text/javascript">
function warning(param)
{
	if(param==1)	alert("您输入的两个密码不匹配，请重试！");
	if(param==2)	alert("您输入的信息不全，请重试！");
	if(param==3)	alert("姓名长度不可大于30字节，请重试！");
	if(param==4)	alert("密码长度不可大于32字节，请重试！");
	if(param==5)	alert("日期格式错误，请重试！");
	if(param==6)	alert("修改成功！");	
}

function confirmUp()
{
	if(confirm("确定修改?"))
	{
		with(document.getElementById("form1"))
		{		
			action="servlet/UpdateAdminServlet";
			submit();
		}
	}
}

</script>
<title>E-Exam</title>
<link rel="stylesheet" href="2col_leftNav.css" type="text/css" />
<style type="text/css">
<!--
.STYLE2 {font-size: medium}
.STYLE3 {
	color: #334d55;
	font-size: large;
	font-weight: bold;
}
body {
	background-color: #FFFFFF;
}
-->
</style>
</head>
<!-- The structure of this file is exactly the same as 2col_rightNav.html;
     the only difference between the two is the stylesheet they use -->
<body>
<div id="masthead">
  <h1 id="siteName"><img src="e-exam.gif" width="578" height="126" /></h1>
  <div class="relatedLinks" id="globalNav">
    <h1>欢迎来到在线考试系统,<%=admin.getA_name()%>管理员.</h1>
  </div>
</div>
<!-- end masthead -->
<div id="content">
  <div id="breadCrumb"> <a href="admin.jsp">管理员首页</a> / <a href="about.html">关于系统</a> / <a href="about.html">联系我们</a> / </div>
  <h2 id="pageName">&nbsp;</h2>
  <div class="feature">
 <h2 id="pageName">修改我的基本信息</h2>
  <form id="form1" name="form1" method="post" >
    <p>姓名
      <input type="text" name="textfield0" value=<%if(admin!=null) out.print(admin.getA_name()); %>>
    </p>
    <p>工号
      <input type="text" name="textfield1" value=<%if(admin!=null) out.print(admin.getA_id()); %>  readonly=true/>
    </p> 
     <p>性别
      <select name="select">
      <%if(admin.getA_sex().equals("male")) {%>   
        <option value="male">男</option>
        <option value="female">女</option>
        <%}else{ %>
        <option value="female">女</option>
        <option value="male">男</option>
        <%} %>
        </select>
      </p>
 	<p>生日
      <input type="text" name="textfield2" value=<%if(admin!=null) out.print(admin.getA_birth()); %>>
    </p>
    <p>输入密码
      <input type="password1" name="password"value=<%if(admin!=null) out.print(admin.getPassword()); %>>
    </p>
    <p>再次输入密码
      <input type="password" name="password1"/>
    </p>
    <p>
      <input type="submit" name="Submit22" value="提交" onclick="confirmUp();">
    </p>
    <p>&nbsp;</p>
  </form>
 
  </div>
</div>


<!--end content -->
<div id="navBar">
  <div id="search">
    <form action="#">
      <label></label>
    </form>
  </div>
  <div id="sectionLinks">
    <ul>
     <li><a href="admin_t.jsp">教师管理</a></li>
      <li><a href="admin_s.jsp">学生管理</a></li>
      <li><a href="admin_c.jsp">课程管理</a></li>
      <li><a href="admin_personal.jsp">个人设定</a></li>
      <li><a href="index.jsp">退出</a></li>
    </ul>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
  </div>
</div>
<!--end navbar -->
<div id="siteInfo"> <img src="title.gif" width="90" height="46" />| &copy;2011 E-EXAM.co.ltd </div>
<br />
<script  type="text/javascript">
warning(<%=param%>);
</script>
</body>
</html>